//
//  FeedBackViewController.m
//  UcarTest
//
//  Created by 陈曦 on 16/3/25.
//  Copyright © 2016年 chenxi. All rights reserved.
//

#import "FeedBackViewController.h"
#import "Define.h"
#import "NetRequestGroup.h"

@interface FeedBackViewController ()

@end

@implementation FeedBackViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.navigationController.navigationBarHidden = NO;
    
    //定义视图背景色
    self.view.backgroundColor = [UIColor colorWithRed:240 / 255.0 green:240 / 255.0 blue:240 / 255.0 alpha:1];
    
    //导航条名字
    //    self.navigationItem.title = @"快速注册";
    //    self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor whiteColor] , NSFontAttributeName : [UIFont boldSystemFontOfSize:18]};
    UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 44)];
    titleLabel.backgroundColor = [UIColor clearColor];
    titleLabel.textColor = [UIColor whiteColor];
    titleLabel.font = [UIFont boldSystemFontOfSize:18];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    titleLabel.text = @"反馈";
    self.navigationItem.titleView = titleLabel;
    
    //重定义返回键
    UIButton *back = [UIButton buttonWithType:UIButtonTypeCustom];
    back.frame = CGRectMake(0, 0, 22, 22);
    [back setImage:[UIImage imageNamed:@"iconfont-fanhui-white"] forState:UIControlStateNormal];
    [back addTarget:self action:@selector(backTpMainView) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem *backBar = [[UIBarButtonItem alloc] initWithCustomView:back];
    self.navigationItem.leftBarButtonItem = backBar;
    
    self.payWebView =  [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)];
    
    NSString *url = [NSString stringWithFormat:@"%@%@",kRealmName,kNetfeedback];
    
    NSURL *rul = [NSURL URLWithString:url];
    
    [self.payWebView loadRequest:[NSURLRequest requestWithURL:rul]];
    
    [self.view addSubview:self.payWebView];
}

- (void) backTpMainView {
    
    [self.navigationController popViewControllerAnimated:nil];
    
}

@end
